﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;

namespace csla4Skeleton.UI.SL.Reports
{
    public partial class BalanceDetailGenerationReport : ChildWindow
    {
        DateTime pFromDate;
        DateTime ToDate;
        public BalanceDetailGenerationReport(DateTime pFromDate, DateTime ToDate)
        {
            StyleManager.ApplicationTheme = new Office_BlackTheme();
            InitializeComponent();
            this.pFromDate = pFromDate;
            this.ToDate = ToDate;
            this.ReportViewer1.RenderBegin += new Telerik.ReportViewer.Silverlight.RenderBeginEventHandler(ReportViewer1_RenderBegin);
            this.ReportViewer1.Report = "ReportLibrary.TongHop.Cash_BalanceDetailGenerationReport, ReportLibrary";
        }

        void ReportViewer1_RenderBegin(object sender, Telerik.ReportViewer.Silverlight.RenderBeginEventArgs args)
        {
            args.ParameterValues["pFromDate"] = pFromDate;
            args.ParameterValues["ToDate"] = ToDate;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}

